<?php
	global $CONFIG;

	//error_log(var_export($VARS, true));
	
	$isEdit = false;
	if (isset($VARS['isEditPage']) && $VARS['isEditPage']) {
		$isEdit = true;
	}

	$pathName = $isEdit ? 'edit' : 'disp';

	if ($CONFIG->jsPaths) {
		if (isset($CONFIG->jsPaths[$pathName])) {
			foreach ($CONFIG->jsPaths[$pathName] as $jsPath) {
				echo "<script type='text/javascript' src='{$jsPath}'></script>\n";
			}
		}
	}

	if ($CONFIG->cssPaths) {
		if (isset($CONFIG->cssPaths[$pathName])) {
			foreach ($CONFIG->cssPaths[$pathName] as $cssPath) {
				echo "<link rel='stylesheet' type='text/css' href='{$cssPath}'>\n";
			}
		}
	}